NCTWMAFILE2Lib

NCTAudioStudio2 ActiveX DLLs
NCTWMAFile2 ActiveX DLL

Version 2.2

NCTWMAFile2 ActiveX DLL is intended for getting audio data from WMA audio file and writing audio data to WMA audio file.

NCTWMAFile2 consists of two objects:

  • WMAFile2 - the main object for getting and writing audio data from WMA audio file.

  • WMAFileInformation2 - a complementary object for reading, changing and writing information about WMA audio file.

With NCTWMAFile2 ActiveX DLL you can:

  • Open WMA audio file.

  • Read audio data from opened file.

  • Get info about WMA file.

  • Change current position in WMA audio file.

  • Create a new WMA audio file.

  • Set format of WMA audio file.

  • Write audio data to WMA audio file.

  • Convert WMA audio file from one format to another.

NCTWMAFile2 is a part of the NCTAudioStudio2 package.

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


NCTWMAFile2 objects

NCTWMAFile2 objects

Object | Description
WMAFile2 | WMAFile2 object reads audio data from WMA file and write audio data to the WMA audio file.
WMAFileInformation2 | WMAFileInformation2 object is intended for reading information about a file from WMA audio file, editing it and writing to the WMA audio file.

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


WMAFile2

WMAFile2 object

WMAFile2 object reads audio data from WMA file and write audio data to the WMA audio file.


WMAFile2_properties

Properties (WMAFile2 object)

Property | Type | Default | Description
ArrayChannels | ChannelsConstants |  | Read-only property that returns the number of channels in the audio data, set by SetFormatArray method. Monaural data uses one channel and stereo data uses two channels.
ArrayFrequency | FrequencyConstants |  | Read-only property that returns the frequency of the audio array, set by SetFormatArray method.
Bitrate | Long |  | Read-only property that returns the bitrate of the audio file, opened by OpenFile method or created by CreateFile method.
BitsPerSample | BitsPerSampleConstants |  | Read-only property that returns the number of bits per sample in the audio file, opened by OpenFile method or created by CreateFile method.
Duration | Long |  | Read-only property that returns the duration of the audio file, opened by OpenFile method or created by CreateFile method.
FormatString | String |  | Read-only property that returns the string with information about the format of the audio file, opened by OpenFile method or created by CreateFile method.
Frequency | FrequencyConstants |  | Read-only property that returns the frequency of the audio file, opened by OpenFile method or created by CreateFile method.
LastErrorNum | ErrorConstants |  | Read-only property that returns the last error code.
nChannels | ChannelsConstants |  | Read-only property that returns the number of channels of the audio file, opened by OpenFile method or created by CreateFile method. Monaural data uses one channel and stereo data uses two channels.
nSamples | Long |  | Read-only property that returns the number of samples in the audio file, opened by OpenFile method or created by CreateFile method.
ProfileCount | Long |  | Read-only property that returns the number of profiles.
ProfileName | String |  | Read-only property that returns the name of the current profile.
ProfileNum | Long |  | Gets or sets the number of the current profile.
Status | Integer |  | Read-only property that returns the current status of the control.

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


ArrayChannels property (WMAFile2 object)

ArrayChannels property (WMAFile2 object)

Read-only property that returns the number of channels in the audio data, set by SetFormatArray method. Monaural data uses one channel and stereo data uses two channels.

Property type

A ChannelsConstants value.

Syntax

object.ArrayChannels [= value]

The ArrayChannels property syntax has these parts:

Part | Type | Description
object | WMAFile2 | An expression evaluating to an object.
value | ChannelsConstants | The number of channels.

Remarks:

If you have not applied SetFormatArray method, this property is set according to the format of file, opened by OpenFile method or created by CreateFile method.

Example:

' VB sample where WMAFile1 is an WMAFile1 object.
Dim nChannels As ChannelsConstants
nChannels = WMAFile1.ArrayChannels

See Also:

ArrayFrequency

Applies to: WMAFile2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


ArrayFrequency property (WMAFile2 object)

ArrayFrequency property (WMAFile2 object)

Read-only property that returns the frequency of the audio array, set by SetFormatArray method.

Property type

A FrequencyConstants value.

Syntax

[value = ]object.ArrayFrequency

The ArrayFrequency property syntax has these parts:

Part | Type | Description
object | WMAFile2 | An expression evaluating to an object.
value | FrequencyConstants | Frequency is in hertz.

Remarks:

If you have not applied SetFormatArray method, this property is set according to the format of the file, opened by OpenFile method or created by CreateFile method.

Example:

' VB sample where File1 is an WMAFile2 objects.
Dim Frequency As FrequencyConstants
Frequency  = File1.ArrayFrequency

See Also:

ArrayChannels

Applies to: WMAFile2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


Bitrate property (WMAFile2 object)

Bitrate property (WMAFile2 object)

Read-only property that returns the bitrate of the audio file, opened by OpenFile method or created by CreateFile method.

Property type

A Long value.

Syntax

[value = ]object.Bitrate

The Bitrate property syntax has these parts:

Part | Type | Description
object | WMAFile2 | An expression evaluating to an object.
value | Long | Bitrate is in bits per second.

Example:

' VB sample where File is WMAFile2 objects.
Dim Caption As String
Caption = "Current bitrate: " & File.Bitrate & " kbit"

See Also:

BitsPerSample | Duration | FormatString | Frequency | nChannels | nSamples

Applies to: WMAFile2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


BitsPerSample property (WMAFile2 object)

BitsPerSample property (WMAFile2 object)

Read-only property that returns the number of bits per sample in the audio file, opened by OpenFile method or created by CreateFile method.

Property type

A BitsPerSampleConstants value.

Syntax

[value = ]object.BitsPerSample

The BitsPerSample property syntax has these parts:

Part | Type | Description
object | WMAFile2 | An expression evaluating to an object.
value | BitsPerSampleConstants | The number of bits per sample in the audio file.

Example:

' VB sample where File is WMAFile2 objects.
Caption = "Current number of bits per sample: " & File.BitsPerSample & " kbit"

See Also:

Bitrate | Duration | FormatString | Frequency | nChannels | nSamples

Applies to: WMAFile2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


Duration property (WMAFile2 object)

Duration property (WMAFile2 object)

Read-only property that returns the duration of the audio file, opened by OpenFile method or created by CreateFile method.

Property type

A Long value.

Syntax

[value = ]object.Duration

The Duration property syntax has these parts:

Part | Type | Description
object | WMAFile2 | An expression evaluating to an object.
value | Long | The duration of audio file, in ms.

Remarks:

This property is changed after applying WriteFile method.

Example:

' VB sample where WMAFile1 is an WMAFile1 object.
Dim Duration As Long
WMAFile1.OpenFile "C:\Music\track.wma"
Duration = WMAFile1.Duration

See Also:

Bitrate | BitsPerSample | FormatString | Frequency | nChannels | nSamples

Applies to: WMAFile2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


FormatString property (WMAFile2 object)

FormatString property (WMAFile2 object)

Read-only property that returns the string with information about the format of the audio file, opened by OpenFile method or created by CreateFile method.

Property type

A String value.

Syntax

[value = ]object.FormatString

The FormatString property syntax has these parts:

Part | Type | Description
object | WMAFile2 | An expression evaluating to an object.
value | String | The string with information about format.

See Also:

Bitrate | BitsPerSample | Duration | Frequency | nChannels | nSamples

Applies to: WMAFile2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


Frequency property (WMAFile2 object)

Frequency property (WMAFile2 object)

Read-only property that returns the frequency of the audio file, opened by OpenFile method or created by CreateFile method.

Property type

A FrequencyConstants value.

Syntax

[value = ]object.Frequency

The Frequency property syntax has these parts:

Part | Type | Description
object | WMAFile2 | An expression evaluating to an object.
value | FrequencyConstants | Frequency is in hertz.

See Also:

Bitrate | BitsPerSample | Duration | FormatString | nChannels | nSamples

Applies to: WMAFile2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


LastErrorNum property (WMAFile2 object)

LastErrorNum property (WMAFile2 object)

Read-only property that returns the last error code.

Property type

An ErrorConstants value.

Syntax

[value = ]object.LastErrorNum

The LastErrorNum property syntax has these parts:

Part | Type | Description
object | WMAFile2 | An expression evaluating to an object.
value | ErrorConstants | Error code.

Remarks:

At present you can use two ways for an errors catch: using the standard error processor from VB or using the LastErrorNum property.

See Also:

Applies to: WMAFile2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


nChannels property (WMAFile2 object)

nChannels property (WMAFile2 object)

Read-only property that returns the number of channels of the audio file, opened by OpenFile method or created by CreateFile method. Monaural data uses one channel and stereo data uses two channels.

Property type

A ChannelsConstants value.

Syntax

[value = ]object.nChannels

The nChannels property syntax has these parts:

Part | Type | Description
object | WMAFile2 | An expression evaluating to an object.
value | ChannelsConstants | The number of channels.

See Also:

Bitrate | BitsPerSample | Duration | FormatString | Frequency | nSamples

Applies to: WMAFile2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


nSamples property (WMAFile2 object)

nSamples property (WMAFile2 object)

Read-only property that returns the number of samples in the audio file, opened by OpenFile method or created by CreateFile method.

Property type

A Long value.

Syntax

[value = ]object.nSamples

The nSamples property syntax has these parts:

Part | Type | Description
object | WMAFile2 | An expression evaluating to an object.
value | Long | The number of samples.

Example:

' VB sample where File and File1 is WMAFile2 objects.
Dim Audio() As Integer
Dim CurrentPos As Long
File1.OpenFile "C:\Music\track.wma"
File.CreateFile "C:\Music\track_copy.wma"
CurrentPos = File1.SeekFile 20,
Audio() = File1.ReadFile(File1.nSamples - CurrentPos)
File.WriteFile Audio()
File.SetFormatArray FQ_44_KHZ, STEREO
File1.CloseFile
File.CloseFile

See Also:

Bitrate | BitsPerSample | Duration | FormatString | Frequency | nChannels

Applies to: WMAFile2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


ProfileCount property (WMAFile2 object)

ProfileCount property (WMAFile2 object)

Read-only property that returns the number of profiles.

Property type

A Long value.

Syntax

[value = ]object.ProfileCount

The ProfileCount property syntax has these parts:

Part | Type | Description
object | WMAFile2 | An expression evaluating to an object.
value | Long | The number of profiles.

Remarks:

At present it is possible to use only 51 existing profiles. For more information go to Profiles description page.

Example:

' VB sample where File and File1 is WMAFile2 objects.
Dim Audio() As Integer
Dim Profile As String
Dim CurrentPos As Long
File1.OpenFile "C:\Music\track.wma"
File.CreateFile "C:\Music\track_copy.wma"
CurrentPos = File1.SeekFile 20,
Audio() = File1.ReadFile(File1.nSamples - CurrentPos)
File.SetFormatArray FQ_44_KHZ, STEREO
File.ProfileNum = File.ProfileCount - 1
Profile = File.ProfileName
File.WriteFile Audio()
File1.CloseFile
File.CloseFile

See Also:

ProfileName | ProfileNum

Applies to: WMAFile2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


ProfileName property (WMAFile2 object)

ProfileName property (WMAFile2 object)

Read-only property that returns the name of the current profile.

Property type

A String value.

Syntax

object.ProfileName [= value]

The ProfileName property syntax has these parts:

Part | Type | Description
object | WMAFile2 | An expression evaluating to an object.
value | String | The name of the current profile.

Remarks:

The ProfileNum property sets the current profile.

At present it is possible to use only 51 existing profiles. For more information go to Profiles description page.

Example:

' VB sample where File and File1 is WMAFile2 objects.
Dim Audio() As Integer
Dim Profile As String
Dim CurrentPos As Long
File1.OpenFile "C:\Music\track.wma"
File.CreateFile "C:\Music\track_copy.wma"
CurrentPos = File1.SeekFile 20,
Audio() = File1.ReadFile(File1.nSamples - CurrentPos)
File.SetFormatArray FQ_44_KHZ, STEREO
File.ProfileNum = File.ProfileCount - 1
Profile = File.ProfileName
File.WriteFile Audio()
File1.CloseFile
File.CloseFile

See Also:

ProfileCount | ProfileNum

Applies to: WMAFile2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


ProfileNum property (WMAFile2 object)

ProfileNum property (WMAFile2 object)

Gets or sets the number of the current profile.

Property type

A Long value.

Syntax

object.ProfileNum [= value]

The ProfileNum property syntax has these parts:

Part | Type | Description
object | WMAFile2 | An expression evaluating to an object.
value | Long | The number of the current profile.

Remarks:

You can use ProfileName property to get the description of the current 'Profile'.

At present it is possible to use only 51 existing profiles. For more information go to Profiles description page.

You can use FormatString property to get the description of the current 'Profile'.

Example:

' VB sample where File and File1 is WMAFile2 objects.
Dim Audio() As Integer
Dim Profile As String
Dim CurrentPos As Long
File1.OpenFile "C:\Music\track.wma"
File.CreateFile "C:\Music\track_copy.wma"
CurrentPos = File1.SeekFile 20,
Audio() = File1.ReadFile(File1.nSamples - CurrentPos)
File.SetFormatArray FQ_44_KHZ, STEREO
File.ProfileNum = File.ProfileCount - 1
Profile = File.ProfileName
File.WriteFile Audio()
File1.CloseFile
File.CloseFile

See Also:

ProfileCount | ProfileName

Applies to: WMAFile2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


Status property (WMAFile2 object)

Status property (WMAFile2 object)

Read-only property that returns the current status of the control.

Property type

An Integer value.

Syntax

[value = ]object.Status

The Status property syntax has these parts:

Part | Type | Description
object | WMAFile2 | An expression evaluating to an object.
value | Integer | Status of the control.

Remarks:

Status code | Description
0 | Audio file isn't opened.
1 | Audio file is opened for reading.
2 | Audio file is opened for writing.

File is opened for reading after applying OpenFile method and for writing after CreateFile method.

Example:

' VB sample where File and File1 is WMAFile2 objects.
Dim Audio() As Integer
Dim CurrentPos As Long
File1.OpenFile "C:\Music\track.wma"
If File1.Status > 0 Then
    File.CreateFile "C:\Music\track_copy.wma"
    CurrentPos = File1.SeekFile 20,
    Audio() = File1.ReadFile(File1.nSamples - CurrentPos)
    File.WriteFile Audio()
    File.SetFormatArray FQ_44_KHZ, STEREO
    File.CloseFile
End If
File1.CloseFile

See Also:

Applies to: WMAFile2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


WMAFile2_Methods

Methods (WMAFile2 object)

Method | Description
CloseFile | Closes the opened audio file.
CreateFile | Creates an output file.
LoadProfileFile | Loads profile parameters from profileFileName file.
OpenFile | Opens an audio file for reading.
ReadFile | Reads an array from the current position of opened an audio file.
Register | Enters user name and registration password to disable About window.
SeekFile | Sets the current position of an audio file.
SetFormatArray | Sets the format of audio data. Audio data is Integer array in PCM format. Audio data is read from a file by ReadFile method and is written to a file by WriteFile method.
WriteFile | Writes audio data array to an audio file.

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


CloseFile method

CloseFile method

Closes the opened audio file.

Syntax

object.CloseFile()

The CloseFile method syntax has these parts:

Part | Type | Description
object | WMAFile2 | An expression evaluating to an object.

Remarks:

This method can be applied only after OpenFile or CreateFile method.

Example:

' VB sample where File is WMAFile2 objects.
Dim nChannels As ChannelsConstants
Dim Frequency As FrequencyConstants
File.OpenFile "C:\Music\track.wma"
nChannels = File.ArrayChannels
Frequency  = File.ArrayFrequency
File.SetFormatArray FQ_44_KHZ, STEREO

Dim Caption As String
Caption = "Current bitrate: " & File.Bitrate & " kbit"

File.CloseFile

See Also:

CreateFile | OpenFile | ReadFile | SeekFile | WriteFile

Applies to: WMAFile2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


CreateFile method

CreateFile method

Creates an output file.

Syntax

object.CreateFile(fileName As String)

The CreateFile method syntax has these parts:

Part | Type | Description
object | WMAFile2 | An expression evaluating to an object.
fileName | String | Pathname of audio file.

Remarks:

Before applying this method you must set the ProfileNum property. After applying this method you can use WriteFile method for writing audio data to audio file.

Audio file can be closed by CloseFile method.

Example:

' VB sample where File and File1 is WMAFile2 objects.
Dim Audio() As Integer
Dim CurrentPos As Long
File1.OpenFile "C:\Music\track.wma"
File.CreateFile "C:\Music\track_copy.wma"
CurrentPos = File1.SeekFile 20,
Audio() = File1.ReadFile(File1.nSamples - CurrentPos)
File.WriteFile Audio()
File.SetFormatArray FQ_44_KHZ, STEREO
File1.CloseFile
File.CloseFile

See Also:

CloseFile | OpenFile | ReadFile | SeekFile | WriteFile

Applies to: WMAFile2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


LoadProfileFile method

LoadProfileFile method (WMAFile2 object)

Loads profile parameters from profileFileName file.

Syntax

object.LoadProfileFile(profileFileName As String)

The LoadProfileFile method syntax has these parts:

Part | Type | Description
object | WMAFile2 | An expression evaluating to an object.
profileFileName | String | The path to the file with profile parameters. By default it is the "WMSysPr9.prx" file from system folder. For example, it is the "C:\WINDOWS\WMSysPr9.prx" path.

Remarks:

You can change profile from system profile parameters to your own parameters using this method.

Example:

' VB sample where WMAFile1 is an WMAFile2 object.
WMAFile2.LoadProfileFile "C:\MyWmaProfiles.prx"

See Also:

Applies to: WMAFile2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


OpenFile method

OpenFile method

Opens an audio file for reading.

Syntax

object.OpenFile(fileName As String)

The OpenFile method syntax has these parts:

Part | Type | Description
object | WMAFile2 | An expression evaluating to an object.
fileName | String | Pathname of audio file.

Remarks:

After applying this method you can use ReadFile method for reading audio data from audio file.

Audio file can be closed by CloseFile method.

Example:

' VB sample where File is WMAFile2 objects.
Dim nChannels As ChannelsConstants
Dim Frequency As FrequencyConstants
File.OpenFile "C:\Music\track.wma"
nChannels = File.ArrayChannels
Frequency  = File.ArrayFrequency
File.SetFormatArray FQ_44_KHZ, STEREO

Dim Caption As String
Caption = "Current bitrate: " & File.Bitrate & " kbit"

File.CloseFile

See Also:

CloseFile | CreateFile | ReadFile | SeekFile | WriteFile

Applies to: WMAFile2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


ReadFile method

ReadFile method

Reads an array from the current position of an opened audio file.

Return Type

A Integer() value.

Syntax

wavArray = object.ReadFile(nSamples As Long)

The ReadFile method syntax has these parts:

Part | Type | Description
object | WMAFile2 | An expression evaluating to an object.
nSamples | Long | Number of read samples.
wavArray | Integer() | Audio data array.

Remarks:

This method can be applied only after OpenFile method.

Example:

' VB sample where File and File1 is WMAFile2 objects.
Dim Audio() As Integer
Dim CurrentPos As Long
File1.OpenFile "C:\Music\track.wma"
File.CreateFile "C:\Music\track_copy.wma"
CurrentPos = File1.SeekFile 20,
Audio() = File1.ReadFile(File1.nSamples - CurrentPos)
File.WriteFile Audio()
File.SetFormatArray FQ_44_KHZ, STEREO
File1.CloseFile
File.CloseFile

See Also:

CloseFile | CreateFile | OpenFile | SeekFile | WriteFile

Applies to: WMAFile2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


Register method

Register method

Enters user name and registration password to disable About window.

Syntax

object.Register(strUser As String, strPassword As String)

The Register method syntax has these parts:

Part | Type | Description
object | WMAFile2 | An expression evaluating to an object.
strUser | String | User name. You get a registration user name after the registration.
strPassword | String | Password string. You get a registration password after the registration.

Example:

' VB sample where File is WMAFile2 objects.
File.Register "****", "****"

See Also:

Applies to: WMAFile2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


SeekFile method

SeekFile method

Sets the current position of an audio file.

Return Type

A Long value.

Syntax

CurrentSample = object.SeekFile(nSamples As Long, Origin As FileSeekConstants)

The SeekFile method syntax has these parts:

Part | Type | Description
object | WMAFile2 | An expression evaluating to an object.
nSamples | Long | Number of samples from origin position.
Origin | FileSeekConstants | By default Origin is equal to BEGIN_POS.
CurrentSample | Long | Current sample in the audio file.

Remarks:

This method can be applied only after OpenFile method.

Example:

' VB sample where File and File1 is WMAFile2 objects.
Dim Audio() As Integer
Dim CurrentPos As Long
File1.OpenFile "C:\Music\track.wma"
File.CreateFile "C:\Music\track_copy.wma"
CurrentPos = File1.SeekFile 20,
Audio() = File1.ReadFile(File1.nSamples - CurrentPos)
File.WriteFile Audio()
File.SetFormatArray FQ_44_KHZ, STEREO
File1.CloseFile
File.CloseFile

See Also:

CloseFile | CreateFile | OpenFile | ReadFile | WriteFile

Applies to: WMAFile2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


SetFormatArray method

SetFormatArray method

Sets the format of audio data. Audio data is Integer array in PCM format. Audio data is read from a file by ReadFile method and is written to a file by WriteFile method.

Syntax

object.SetFormatArray(Frequency As FrequencyConstants, nChannels As ChannelsConstants)

The SetFormatArray method syntax has these parts:

Part | Type | Description
object | WMAFile2 | An expression evaluating to an object.
Frequency | FrequencyConstants | Frequency of the audio file. By default Frequency is equal to FQ_44_KHZ.
nChannels | ChannelsConstants | Number of channels of the audio file. By default nChannels is equal to STEREO.

Remarks:

This method sets ArrayFrequency and ArrayChannels properties.

Example:

' VB sample where File and File1 is WMAFile2 objects.
Dim Audio() As Integer
Dim CurrentPos As Long
File1.OpenFile "C:\Music\track.wma"
File.CreateFile "C:\Music\track_copy.wma"
CurrentPos = File1.SeekFile 20,
Audio() = File1.ReadFile(File1.nSamples - CurrentPos)
File.WriteFile Audio()
File.SetFormatArray FQ_44_KHZ, STEREO
File1.CloseFile
File.CloseFile

See Also:

Applies to: WMAFile2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


WriteFile method

WriteFile method

Writes audio data array to an audio file.

Syntax

object.WriteFile(WavArray As Integer())

The WriteFile method syntax has these parts:

Part | Type | Description
object | WMAFile2 | An expression evaluating to an object.
WavArray | Integer() | Audio data array.

Remarks:

This method can be applied only after CreateFile method.

Example:

' VB sample where File and File1 is WMAFile2 objects.
Dim Audio() As Integer
Dim CurrentPos As Long
File1.OpenFile "C:\Music\track.wma"
File.CreateFile "C:\Music\track_copy.wma"
CurrentPos = File1.SeekFile 20,
Audio() = File1.ReadFile(File1.nSamples - CurrentPos)
File.WriteFile Audio()
File.SetFormatArray FQ_44_KHZ, STEREO
File1.CloseFile
File.CloseFile

See Also:

CloseFile | CreateFile | OpenFile | ReadFile | SeekFile

Applies to: WMAFile2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


WMAFileInformation2

WMAFileInformation2 object

WMAFileInformation2 object is intended for reading information about a file from WMA audio file, editing it and writing to the WMA audio file.

This object contains methods and properties for reading and editing the following information:

  • main information (Bitrate, BitsPerSample, Channels, Duration, FormatString, Frequency, Samples, Size)

  • info (GetAudioInformation, infoAlbum, infoArtist, infoComments, infoComposer, infoCopyright, infoEncodedBy, infoGenre, infoOriginalArtist, infoTitle, infoTrack, infoURL, infoYear, SetAudioInformation)

  • markers (InsertMarker, MarkerCount, MarkerName, MarkerNum, MarkerTime, DeleteMarker)

  • scripts (InsertScript, ScriptCommand, ScriptCount, ScriptNum, ScriptTime, ScriptType, DeleteScript)


WMAFileInformation2_properties

properties (WMAFileInformation2 object)

Property | Type | Default | Description
Bitrate | Long |  | Read-only property that returns the bitrate of an audio file.
BitsPerSample | BitsPerSampleConstants |  | Read-only property that returns the number of bits per sample in the audio file.
Channels | Long |  | Read-only property that returns the number of channels in the audio file. Mono data uses one channel and stereo data uses two channels.
Duration | Long |  | Read-only property that returns duration of an audio file.
FormatString | String |  | Read-only property that returns the string with information about the format of the audio file.
Frequency | FrequencyConstants |  | Read-only property that returns the frequency of the audio file.
infoAlbum | String |  | Gets or sets the string with the album name, which contains the audio file subject.
infoArtist | String |  | Gets or sets the string with the name of the artist who created the original subject of the file. If there are many artists, the names are separated by a semicolon and a blank.
infoComments | String |  | Gets or sets the string with general comments about the audio file or the audio file subject.
infoComposer | String |  | Gets or sets the string with the name of the composer who created the original music of the file.
infoCopyright | String |  | Gets or sets the string with the copyright information for the audio file.
infoEncodedBy | String |  | Gets or sets the string with information about the encoder.
infoGenre | String |  | Gets or sets the genre or classification of the audio file.
infoOriginalArtist | String |  | Gets or sets the name of the artist who originally produced the content.
infoTitle | String |  | Gets or sets the string with the title of the audio file subject.
infoTrack | String |  | Gets or sets the number of the track of the audio file subject.
infoURL | String |  | Gets or sets the URL of the audio file subject.
infoYear | String |  | Gets or sets the year when the audio file subject was created.
LastErrorNum | ErrorConstants |  | Read-only property that returns the last error code.
MarkerCount | Long |  | Read-only property that returns the number of markers.
MarkerName | String |  | Gets or sets the name of the current marker.
MarkerNum | Long |  | Gets or sets the number of the current marker.
MarkerTime | Long |  | Gets or sets the time moment that is marked.
Samples | Long |  | Read-only property that returns the number of samples in an audio file.
ScriptCommand | String |  | Gets or sets a string with a script command.
ScriptCount | Long |  | Read-only property that returns the number of scripts.
ScriptNum | Long |  | Gets or sets the number of the current script.
ScriptTime | Long |  | Gets or sets the time moment after which the script will be executed.
ScriptType | String |  | Gets or sets the string with the script type information.
Size | Long |  | Read-only property that returns the size of an audio file.

end Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


Bitrate property (WMAFileInformation2 object)

Bitrate property (WMAFileInformation2 object)

Read-only property that returns the bitrate of an audio file.

Property type

A Long value.

Syntax

[value = ]object.Bitrate

The Bitrate property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | Long | Bitrate is in bits per second.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.SetAudioInformation "c:\music.wma"
infoFormatString.Text = Info.FormatString
infoFrequency.Text = Info.Frequency & " Hz"
infoBitrate.Text = Info.Bitrate & " bps"
infoDuration.Text = Info.Duration & " ms"
infoChannels.Text = Info.Channels
infoSamples.Text = Info.Samples
infoSize.Text = Info.Size
infoBitsPerSample.Text = Info.BitsPerSample

See Also:

BitsPerSample | Channels | Duration | FormatString | Frequency | Samples | Size

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
 NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


BitsPerSample property (WMAFileInformation2 object)

BitsPerSample property (WMAFileInformation2 object)

Read-only property that returns the number of bits per sample in the audio file.

Property type

A BitsPerSampleConstants value.

Syntax

[value = ]object.BitsPerSample

The BitsPerSample property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | BitsPerSampleConstants | The number of bits per sample in the audio file.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.SetAudioInformation "c:\music.wma"
infoFormatString.Text = Info.FormatString
infoFrequency.Text = Info.Frequency & " Hz"
infoBitrate.Text = Info.Bitrate & " bps"
infoDuration.Text = Info.Duration & " ms"
infoChannels.Text = Info.Channels
infoSamples.Text = Info.Samples
infoSize.Text = Info.Size
infoBitsPerSample.Text = Info.BitsPerSample

See Also:

Bitrate | Channels | Duration | FormatString | Frequency | Samples | Size

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
 NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


Channels property (WMAFileInformation2 object)

Channels property (WMAFileInformation2 object)

Read-only property that returns the number of channels in the audio file. Mono data uses one channel and stereo data uses two channels.

Property type

A Long value.

Syntax

[value = ]object.Channels

The Channels property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | Long | The number of channels in the audio file. Can be 1 (mono) or 2 (stereo).

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.SetAudioInformation "c:\music.wma"
infoFormatString.Text = Info.FormatString
infoFrequency.Text = Info.Frequency & " Hz"
infoBitrate.Text = Info.Bitrate & " bps"
infoDuration.Text = Info.Duration & " ms"
infoChannels.Text = Info.Channels
infoSamples.Text = Info.Samples
infoSize.Text = Info.Size
infoBitsPerSample.Text = Info.BitsPerSample

See Also:

Bitrate | BitsPerSample | Duration | FormatString | Frequency | Samples | Size

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


Duration property (WMAFileInformation2 object)

Duration property (WMAFileInformation2 object)

Read-only property that returns duration of an audio file.

Property type

A Long value.

Syntax

[value = ]object.Duration

The Duration property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | Long | The duration of audio file, in ms.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.InsertScript "URL", "http://www.nctsoft.com", 10
Info.ScriptCommand = "http://www.nctsoft.com/products/NCTAudioStudio2/"
Info.InsertScript "FILENAME", "c:/track02.wma", Info.Duration - 2
Info.ScriptType = "CAPTION"
Info.ScriptCommand = "Test"
Info.ScriptNum = Info.ScriptCount - 1
Info.ScriptTime = 30
Info.ScriptNum = Info.ScriptCount
Info.InsertScript "TEXT", "Text", Info.Duration - 1
Info.ScriptNum = Info.ScriptCount - 1
Info.DeleteScript

See Also:

Bitrate | BitsPerSample | Channels | FormatString | Frequency | Samples | Size

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
 NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


FormatString property (WMAFileInformation2 object)

FormatString property (WMAFileInformation2 object)

Read-only property that returns the string with information about the format of the audio file.

Property type

A String value.

Syntax

[value = ]object.FormatString

The FormatString property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | String | The string with information about format.

Remarks:

This string contains the name of the format, frequency, number of bits per sample, number of channels and bitrate like profile description in the ProfileNum page.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.SetAudioInformation "c:\music.wma"
infoFormatString.Text = Info.FormatString
infoFrequency.Text = Info.Frequency & " Hz"
infoBitrate.Text = Info.Bitrate & " bps"
infoDuration.Text = Info.Duration & " ms"
infoChannels.Text = Info.Channels
infoSamples.Text = Info.Samples
infoSize.Text = Info.Size
infoBitsPerSample.Text = Info.BitsPerSample

See Also:

Bitrate | BitsPerSample | Channels | Duration | Frequency | Samples | Size

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
 NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


Frequency property (WMAFileInformation2 object)

Frequency property (WMAFileInformation2 object)

Read-only property that returns the frequency of the audio file.

Property type

A FrequencyConstants value.

Syntax

[value = ]object.Frequency

The Frequency property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | FrequencyConstants | Frequency is in hertz.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.SetAudioInformation "c:\music.wma"
infoFormatString.Text = Info.FormatString
infoFrequency.Text = Info.Frequency & " Hz"
infoBitrate.Text = Info.Bitrate & " bps"
infoDuration.Text = Info.Duration & " ms"
infoChannels.Text = Info.Channels
infoSamples.Text = Info.Samples
infoSize.Text = Info.Size
infoBitsPerSample.Text = Info.BitsPerSample

See Also:

Bitrate | BitsPerSample | Channels | Duration | FormatString | Samples | Size

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
 NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


infoAlbum property (WMAFileInformation2 object)

infoAlbum property (WMAFileInformation2 object)

Gets or sets the string with the album name, which contains the audio file subject.

Property type

A String value.

Syntax

object.infoAlbum [= value]

The infoAlbum property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | String | The album name.

Remarks:

infoAlbum property accepts correct value only after applying of the GetAudioInformation method.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.infoAlbum = "Unknown album"
Info.infoArtist = "Unknown artist"
Info.infoComments = "No comments"
Info.infoComposer = "Unknown composer"
Info.infoCopyright = ""
Info.infoEncodedBy = ""
Info.infoGenre = "Pop"
Info.infoOriginalArtist = "Unknown original artist"
Info.infoTitle = "No title"
Info.infoTrack = "test"
Info.infoURL = "http://www.nctsoft.com"
Info.infoYear = "2003"
Info.SetAudioInformation "c:\music.wma"

See Also:

infoArtist | infoComments | infoComposer | infoCopyright | infoEncodedBy | infoGenre | infoOriginalArtist | infoTitle | infoTrack | infoURL | infoYear

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


infoArtist property (WMAFileInformation2 object)

infoArtist property (WMAFileInformation2 object)

Gets or sets the string with the name of the artist who created the original subject of the file. If there are many artists, the names are separated by a semicolon and a blank.

Property type

A String value.

Syntax

object.infoArtist [= value]

The infoArtist property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | String | Artist's name.

Remarks:

infoArtist property accepts correct value only after applying of the GetAudioInformation method.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.infoAlbum = "Unknown album"
Info.infoArtist = "Unknown artist"
Info.infoComments = "No comments"
Info.infoComposer = "Unknown composer"
Info.infoCopyright = ""
Info.infoEncodedBy = ""
Info.infoGenre = "Pop"
Info.infoOriginalArtist = "Unknown original artist"
Info.infoTitle = "No title"
Info.infoTrack = "test"
Info.infoURL = "http://www.nctsoft.com"
Info.infoYear = "2003"
Info.SetAudioInformation "c:\music.wma"

See Also:

infoAlbum | infoComments | infoComposer | infoCopyright | infoEncodedBy | infoGenre | infoOriginalArtist | infoTitle | infoTrack | infoURL | infoYear

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


infoComments property (WMAFileInformation2 object)

infoComments property (WMAFileInformation2 object)

Gets or sets the string with general comments about the audio file or the audio file subject.

Property type

A String value.

Syntax

object.infoComments [= value]

The infoComments property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | String | The string with general comments.

Remarks:

infoComments property accepts correct value only after applying of the GetAudioInformation method.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.infoAlbum = "Unknown album"
Info.infoArtist = "Unknown artist"
Info.infoComments = "No comments"
Info.infoComposer = "Unknown composer"
Info.infoCopyright = ""
Info.infoEncodedBy = ""
Info.infoGenre = "Pop"
Info.infoOriginalArtist = "Unknown original artist"
Info.infoTitle = "No title"
Info.infoTrack = "test"
Info.infoURL = "http://www.nctsoft.com"
Info.infoYear = "2003"
Info.SetAudioInformation "c:\music.wma"

See Also:

infoAlbum | infoArtist | infoComposer | infoCopyright | infoEncodedBy | infoGenre | infoOriginalArtist | infoTitle | infoTrack | infoURL | infoYear

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


infoComposer property (WMAFileInformation2 object)

infoComposer property (WMAFileInformation2 object)

Gets or sets the string with the name of the composer who created the original music of the file.

Property type

A String value.

Syntax

object.infoComposer [= value]

The infoComposer property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | String | Composer's name.

Remarks:

infoComposer property accepts correct value only after applying of the GetAudioInformation method.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.infoAlbum = "Unknown album"
Info.infoArtist = "Unknown artist"
Info.infoComments = "No comments"
Info.infoComposer = "Unknown composer"
Info.infoCopyright = ""
Info.infoEncodedBy = ""
Info.infoGenre = "Pop"
Info.infoOriginalArtist = "Unknown original artist"
Info.infoTitle = "No title"
Info.infoTrack = "test"
Info.infoURL = "http://www.nctsoft.com"
Info.infoYear = "2003"
Info.SetAudioInformation "c:\music.wma"

See Also:

infoAlbum | infoArtist | infoComments | infoCopyright | infoEncodedBy | infoGenre | infoOriginalArtist | infoTitle | infoTrack | infoURL | infoYear

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


infoCopyright property (WMAFileInformation2 object)

infoCopyright property (WMAFileInformation2 object)

Gets or sets the string with the copyright information for the audio file.

Property type

A String value.

Syntax

object.infoCopyright [= value]

The infoCopyright property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | String | The copyright information.

Remarks:

infoCopyright property accepts correct value only after applying of the GetAudioInformation method.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.infoAlbum = "Unknown album"
Info.infoArtist = "Unknown artist"
Info.infoComments = "No comments"
Info.infoComposer = "Unknown composer"
Info.infoCopyright = ""
Info.infoEncodedBy = ""
Info.infoGenre = "Pop"
Info.infoOriginalArtist = "Unknown original artist"
Info.infoTitle = "No title"
Info.infoTrack = "test"
Info.infoURL = "http://www.nctsoft.com"
Info.infoYear = "2003"
Info.SetAudioInformation "c:\music.wma"

See Also:

infoAlbum | infoArtist | infoComments | infoComposer | infoEncodedBy | infoGenre | infoOriginalArtist | infoTitle | infoTrack | infoURL | infoYear

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


infoEncodedBy property (WMAFileInformation2 object)

infoEncodedBy property (WMAFileInformation2 object)

Gets or sets the string with information about the encoder.

Property type

A String value.

Syntax

object.infoEncodedBy [= value]

The infoEncodedBy property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | String | Type of encoder.

Remarks:

infoEncodedBy property accepts correct value only after applying of the GetAudioInformation method.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.infoAlbum = "Unknown album"
Info.infoArtist = "Unknown artist"
Info.infoComments = "No comments"
Info.infoComposer = "Unknown composer"
Info.infoCopyright = ""
Info.infoEncodedBy = ""
Info.infoGenre = "Pop"
Info.infoOriginalArtist = "Unknown original artist"
Info.infoTitle = "No title"
Info.infoTrack = "test"
Info.infoURL = "http://www.nctsoft.com"
Info.infoYear = "2003"
Info.SetAudioInformation "c:\music.wma"

See Also:

infoAlbum | infoArtist | infoComments | infoComposer | infoCopyright | infoGenre | infoOriginalArtist | infoTitle | infoTrack | infoURL | infoYear

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


infoGenre property (WMAFileInformation2 object)

infoGenre property (WMAFileInformation2 object)

Gets or sets the genre or classification of the audio file.

Property type

A String value.

Syntax

object.infoGenre [= value]

The infoGenre property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | String | The genre or classification of the audio file.

Remarks:

infoGenre property accepts correct value only after applying of the GetAudioInformation method. The Genre page contains the list of genres.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.infoAlbum = "Unknown album"
Info.infoArtist = "Unknown artist"
Info.infoComments = "No comments"
Info.infoComposer = "Unknown composer"
Info.infoCopyright = ""
Info.infoEncodedBy = ""
Info.infoGenre = "Pop"
Info.infoOriginalArtist = "Unknown original artist"
Info.infoTitle = "No title"
Info.infoTrack = "test"
Info.infoURL = "http://www.nctsoft.com"
Info.infoYear = "2003"
Info.SetAudioInformation "c:\music.wma"

See Also:

infoAlbum | infoArtist | infoComments | infoComposer | infoCopyright | infoEncodedBy | infoOriginalArtist | infoTitle | infoTrack | infoURL | infoYear

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


infoOriginalArtist property (WMAFileInformation2 object)

infoOriginalArtist property (WMAFileInformation2 object)

Gets or sets the name of the artist who originally produced the content.

Property type

A String value.

Syntax

object.infoOriginalArtist [= value]

The infoOriginalArtist property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | String | Artist's name.

Remarks:

infoOriginalArtist property accepts correct value only after applying of the GetAudioInformation method.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.infoAlbum = "Unknown album"
Info.infoArtist = "Unknown artist"
Info.infoComments = "No comments"
Info.infoComposer = "Unknown composer"
Info.infoCopyright = ""
Info.infoEncodedBy = ""
Info.infoGenre = "Pop"
Info.infoOriginalArtist = "Unknown original artist"
Info.infoTitle = "No title"
Info.infoTrack = "test"
Info.infoURL = "http://www.nctsoft.com"
Info.infoYear = "2003"
Info.SetAudioInformation "c:\music.wma"

See Also:

infoAlbum | infoArtist | infoComments | infoComposer | infoCopyright | infoEncodedBy | infoGenre | infoTitle | infoTrack | infoURL | infoYear

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


infoTitle property (WMAFileInformation2 object)

infoTitle property (WMAFileInformation2 object)

Gets or sets the string with the title of the audio file subject.

Property type

A String value.

Syntax

object.infoTitle [= value]

The infoTitle property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | String | The title of the file.

Remarks:

infoTitle property accepts correct value only after applying of the GetAudioInformation method.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.infoAlbum = "Unknown album"
Info.infoArtist = "Unknown artist"
Info.infoComments = "No comments"
Info.infoComposer = "Unknown composer"
Info.infoCopyright = ""
Info.infoEncodedBy = ""
Info.infoGenre = "Pop"
Info.infoOriginalArtist = "Unknown original artist"
Info.infoTitle = "No title"
Info.infoTrack = "test"
Info.infoURL = "http://www.nctsoft.com"
Info.infoYear = "2003"
Info.SetAudioInformation "c:\music.wma"

See Also:

infoAlbum | infoArtist | infoComments | infoComposer | infoCopyright | infoEncodedBy | infoGenre | infoOriginalArtist | infoTrack | infoURL | infoYear

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


infoTrack property (WMAFileInformation2 object)

infoTrack property (WMAFileInformation2 object)

Gets or sets the number of the track of the audio file subject.

Property type

A String value.

Syntax

object.infoTrack [= value]

The infoTrack property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | String | Number of track.

Remarks:

infoTrack property accepts correct value only after applying of the GetAudioInformation method.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.infoAlbum = "Unknown album"
Info.infoArtist = "Unknown artist"
Info.infoComments = "No comments"
Info.infoComposer = "Unknown composer"
Info.infoCopyright = ""
Info.infoEncodedBy = ""
Info.infoGenre = "Pop"
Info.infoOriginalArtist = "Unknown original artist"
Info.infoTitle = "No title"
Info.infoTrack = "test"
Info.infoURL = "http://www.nctsoft.com"
Info.infoYear = "2003"
Info.SetAudioInformation "c:\music.wma"

See Also:

infoAlbum | infoArtist | infoComments | infoComposer | infoCopyright | infoEncodedBy | infoGenre | infoOriginalArtist | infoTitle | infoURL | infoYear

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


infoURL property (WMAFileInformation2 object)

infoURL property (WMAFileInformation2 object)

Gets or sets the URL of the audio file subject.

Property type

A String value.

Syntax

object.infoURL [= value]

The infoURL property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | String | The URL of the audio file subject.

Remarks:

infoURL property accepts correct value only after applying of the GetAudioInformation method.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.infoAlbum = "Unknown album"
Info.infoArtist = "Unknown artist"
Info.infoComments = "No comments"
Info.infoComposer = "Unknown composer"
Info.infoCopyright = ""
Info.infoEncodedBy = ""
Info.infoGenre = "Pop"
Info.infoOriginalArtist = "Unknown original artist"
Info.infoTitle = "No title"
Info.infoTrack = "test"
Info.infoURL = "http://www.nctsoft.com"
Info.infoYear = "2003"
Info.SetAudioInformation "c:\music.wma"

See Also:

infoAlbum | infoArtist | infoComments | infoComposer | infoCopyright | infoEncodedBy | infoGenre | infoOriginalArtist | infoTitle | infoTrack | infoYear

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


infoYear property (WMAFileInformation2 object)

infoYear property (WMAFileInformation2 object)

Gets or sets the year when the audio file subject was created.

Property type

A String value.

Syntax

object.infoYear [= value]

The infoYear property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | String | The year when the audio file subject was created.

Remarks:

infoYear property accepts correct value only after applying of the GetAudioInformation method.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.infoAlbum = "Unknown album"
Info.infoArtist = "Unknown artist"
Info.infoComments = "No comments"
Info.infoComposer = "Unknown composer"
Info.infoCopyright = ""
Info.infoEncodedBy = ""
Info.infoGenre = "Pop"
Info.infoOriginalArtist = "Unknown original artist"
Info.infoTitle = "No title"
Info.infoTrack = "test"
Info.infoURL = "http://www.nctsoft.com"
Info.infoYear = "2003"
Info.SetAudioInformation "c:\music.wma"

See Also:

infoAlbum | infoArtist | infoComments | infoComposer | infoCopyright | infoEncodedBy | infoGenre | infoOriginalArtist | infoTitle | infoTrack | infoURL

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


LastErrorNum property (WMAFileInformation2 object)

LastErrorNum property (WMAFileInformation2 object)

Read-only property that returns the last error code.

Property type

An ErrorConstants value.

Syntax

[value = ]object.LastErrorNum

The LastErrorNum property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | ErrorConstants | Error code.

Remarks:

At present you can use two ways for an errors catch: using the standard error processor from VB or using the LastErrorNum property.

See Also:

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
 NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


MarkerCount property (WMAFileInformation2 object)

MarkerCount property (WMAFileInformation2 object)

Read-only property that returns the number of markers.

Property type

A Long value.

Syntax

[value = ]object.MarkerCount

The MarkerCount property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | Long | The number of markers.

Remarks:

Set by InsertMarker and DeleteMarker methods.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.InsertMarker "First", 10
Info.MarkerName = "First marker"
Info.InsertMarker "Second marker", Info.Duration - 2
Info.MarkerNum = Info.MarkerCount - 1
Info.MarkerTime = 30
Info.MarkerNum = Info.MarkerCount
Info.InsertMarker "Final marker", Info.Duration - 1
Info.MarkerNum = Info.MarkerCount - 1
Info.DeleteMarker

See Also:

MarkerName | MarkerNum | MarkerTime

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


MarkerName property (WMAFileInformation2 object)

MarkerName property (WMAFileInformation2 object)

Gets or sets the name of the current marker.

Property type

A String value.

Syntax

object.MarkerName [= value]

The MarkerName property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | String | The name of the current marker.

Remarks:

The current position set by MarkerNum property.

The marker created by InsertMarker method and deleted by DeleteMarker method.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.InsertMarker "First", 10
Info.MarkerName = "First marker"
Info.InsertMarker "Second marker", Info.Duration - 2
Info.MarkerNum = Info.MarkerCount - 1
Info.MarkerTime = 30
Info.MarkerNum = Info.MarkerCount
Info.InsertMarker "Final marker", Info.Duration - 1
Info.MarkerNum = Info.MarkerCount - 1
Info.DeleteMarker

See Also:

MarkerCount | MarkerNum | MarkerTime

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


MarkerNum property (WMAFileInformation2 object)

MarkerNum property (WMAFileInformation2 object)

Gets or sets the number of the current marker.

Property type

A Long value.

Syntax

object.MarkerNum [= value]

The MarkerNum property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | Long | The number of the marker.

Remarks:

The marker created by InsertMarker method and deleted by DeleteMarker method.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.InsertMarker "First", 10
Info.MarkerName = "First marker"
Info.InsertMarker "Second marker", Info.Duration - 2
Info.MarkerNum = Info.MarkerCount - 1
Info.MarkerTime = 30
Info.MarkerNum = Info.MarkerCount
Info.InsertMarker "Final marker", Info.Duration - 1
Info.MarkerNum = Info.MarkerCount - 1
Info.DeleteMarker

See Also:

MarkerCount | MarkerName | MarkerTime

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


MarkerTime property (WMAFileInformation2 object)

MarkerTime property (WMAFileInformation2 object)

Gets or sets the time moment that is marked.

Property type

A Long value.

Syntax

object.MarkerTime [= value]

The MarkerTime property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | Long | The marker time.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.InsertMarker "First", 10
Info.MarkerName = "First marker"
Info.InsertMarker "Second marker", Info.Duration - 2
Info.MarkerNum = Info.MarkerCount - 1
Info.MarkerTime = 30
Info.MarkerNum = Info.MarkerCount
Info.InsertMarker "Final marker", Info.Duration - 1
Info.MarkerNum = Info.MarkerCount - 1
Info.DeleteMarker

See Also:

MarkerCount | MarkerName | MarkerNum

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


Samples property (WMAFileInformation2 object)

Samples property (WMAFileInformation2 object)

Read-only property that returns the number of samples in an audio file.

Property type

A Long value.

Syntax

object.Samples [= value]

The Samples property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | Long |

Remarks:

The number of samples in an audio file.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.SetAudioInformation "c:\music.wma"
infoFormatString.Text = Info.FormatString
infoFrequency.Text = Info.Frequency & " Hz"
infoBitrate.Text = Info.Bitrate & " bps"
infoDuration.Text = Info.Duration & " ms"
infoChannels.Text = Info.Channels
infoSamples.Text = Info.Samples
infoSize.Text = Info.Size
infoBitsPerSample.Text = Info.BitsPerSample

See Also:

Bitrate | BitsPerSample | Channels | Duration | FormatString | Frequency | Size

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


ScriptCommand property (WMAFileInformation2 object)

ScriptCommand property (WMAFileInformation2 object)

Gets or sets a string with a script command.

Property type

A String value.

Syntax

object.ScriptCommand [= value]

The ScriptCommand property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | String | The script command string.

Remarks:

A wide-character null-terminated string containing the command. Script commands are limited to 10240 wide characters.

Script commands can be included in the file header for retrieval at the time of playback. The playing application is responsible for the executing of the script commands at the proper time. The advantage of using script commands in the file header is that all the script commands are available before starting to receive samples.

The script commands supported by the Windows Media Format SDK are simple name and value string pairs. For example, a common script command is "URL", which is used by Windows Media Player and other playing applications to open Web pages. The other half of the script pair for "URL" command contains a valid uniform resource locator (URL), like "http://www.nctsoft.com". No support is provided by the objects of this SDK for any specific commands; your application must include logic to handle whatever commands you use. You can use the commands supported by Windows Media Player to maintain compatibility with most players.

The script created by InsertScript method and deleted by DeleteScript method.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.InsertScript "URL", "http://www.nctsoft.com", 10
Info.ScriptCommand = "http://www.nctsoft.com/products/NCTAudioStudio2/"
Info.InsertScript "FILENAME", "c:/track02.wma", Info.Duration - 2
Info.ScriptType = "CAPTION"
Info.ScriptCommand = "Test"
Info.ScriptNum = Info.ScriptCount - 1
Info.ScriptTime = 30
Info.ScriptNum = Info.ScriptCount
Info.InsertScript "TEXT", "Text", Info.Duration - 1
Info.ScriptNum = Info.ScriptCount - 1
Info.DeleteScript

See Also:

ScriptCount | ScriptNum | ScriptTime | ScriptType

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


ScriptCount property (WMAFileInformation2 object)

ScriptCount property (WMAFileInformation2 object)

Read-only property that returns the number of scripts.

Property type

A Long value.

Syntax

object.ScriptCount [= value]

The ScriptCount property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | Long | The number of scripts.

Remarks:

Set by InsertScript and DeleteScript methods.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.InsertScript "URL", "http://www.nctsoft.com", 10
Info.ScriptCommand = "http://www.nctsoft.com/products/NCTAudioStudio2/"
Info.InsertScript "FILENAME", "c:/track02.wma", Info.Duration - 2
Info.ScriptType = "CAPTION"
Info.ScriptCommand = "Test"
Info.ScriptNum = Info.ScriptCount - 1
Info.ScriptTime = 30
Info.ScriptNum = Info.ScriptCount
Info.InsertScript "TEXT", "Text", Info.Duration - 1
Info.ScriptNum = Info.ScriptCount - 1
Info.DeleteScript

See Also:

ScriptCommand | ScriptNum | ScriptTime | ScriptType

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


ScriptNum property (WMAFileInformation2 object)

ScriptNum property (WMAFileInformation2 object)

Gets or sets the number of the current script.

Property type

A Long value.

Syntax

object.ScriptNum [= value]

The ScriptNum property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | Long | The script number.

Remarks:

The script created by InsertScript method and deleted by DeleteScript method.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.InsertScript "URL", "http://www.nctsoft.com", 10
Info.ScriptCommand = "http://www.nctsoft.com/products/NCTAudioStudio2/"
Info.InsertScript "FILENAME", "c:/track02.wma", Info.Duration - 2
Info.ScriptType = "CAPTION"
Info.ScriptCommand = "Test"
Info.ScriptNum = Info.ScriptCount - 1
Info.ScriptTime = 30
Info.ScriptNum = Info.ScriptCount
Info.InsertScript "TEXT", "Text", Info.Duration - 1
Info.ScriptNum = Info.ScriptCount - 1
Info.DeleteScript

See Also:

ScriptCommand | ScriptCount | ScriptTime | ScriptType

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


ScriptTime property (WMAFileInformation2 object)

ScriptTime property (WMAFileInformation2 object)

Gets or sets the time moment after which the script will be executed.

Property type

A Long value.

Syntax

object.ScriptTime [= value]

The ScriptTime property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | Long | The moment for the execution of the script.

Remarks:

The script created by InsertScript method and deleted by DeleteScript method.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.InsertScript "URL", "http://www.nctsoft.com", 10
Info.ScriptCommand = "http://www.nctsoft.com/products/NCTAudioStudio2/"
Info.InsertScript "FILENAME", "c:/track02.wma", Info.Duration - 2
Info.ScriptType = "CAPTION"
Info.ScriptCommand = "Test"
Info.ScriptNum = Info.ScriptCount - 1
Info.ScriptTime = 30
Info.ScriptNum = Info.ScriptCount
Info.InsertScript "TEXT", "Text", Info.Duration - 1
Info.ScriptNum = Info.ScriptCount - 1
Info.DeleteScript

See Also:

ScriptCommand | ScriptCount | ScriptNum | ScriptType

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


ScriptType property (WMAFileInformation2 object)

ScriptType property (WMAFileInformation2 object)

Gets or sets the string with the script type information.

Property type

A String value.

Syntax

object.ScriptType [= value]

The ScriptType property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | String | The string with the script type information.

Remarks:

The script created by InsertScript method and deleted by DeleteScript method.

The following table lists the script types supported by Windows Media Player.

Script type | Description
URL | The player sends the specified URL to the browser to display it to the user. If an embedded player control is being used, you can add a specific frame reference to the URL by using the &&framename syntax.
FILENAME | A URL to another media file to be played.
CAPTION | A text string that is displayed in the caption area of Windows Media Player. This type supports standard HTML formatting, so the text can be formatted as you wish. An example of its use is closed captioning.
EVENT | The name of the event that is to occur. The EVENT type supports customization for your own use. The code for the specified event must be defined in the Windows Media metafile for the stream so that the player can perform the specified event. An example of use is ad insertion.
OPENEVENT | This script precedes the actual EVENT. The OPENEVENT allows the player to pre-buffer the content so that when the EVENT occurs, the switch between streams appears to be seamless.
TEXT | A TEXT string that is displayed in the caption area of Windows Media Player. Can be plain text, SAMI, or HTML formatted text.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.InsertScript "URL", "http://www.nctsoft.com", 10
Info.ScriptCommand = "http://www.nctsoft.com/products/NCTAudioStudio2/"
Info.InsertScript "FILENAME", "c:/track02.wma", Info.Duration - 2
Info.ScriptType = "CAPTION"
Info.ScriptCommand = "Test"
Info.ScriptNum = Info.ScriptCount - 1
Info.ScriptTime = 30
Info.ScriptNum = Info.ScriptCount
Info.InsertScript "TEXT", "Text", Info.Duration - 1
Info.ScriptNum = Info.ScriptCount - 1
Info.DeleteScript

See Also:

ScriptCommand | ScriptCount | ScriptNum | ScriptTime

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


Size property (WMAFileInformation2 object)

Size property (WMAFileInformation2 object)

Read-only property that returns the size of an audio file.

Property type

A Long value.

Syntax

[value = ]object.Size

The Size property syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
value | Long | The size is in bytes.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.SetAudioInformation "c:\music.wma"
infoFormatString.Text = Info.FormatString
infoFrequency.Text = Info.Frequency & " Hz"
infoBitrate.Text = Info.Bitrate & " bps"
infoDuration.Text = Info.Duration & " ms"
infoChannels.Text = Info.Channels
infoSamples.Text = Info.Samples
infoSize.Text = Info.Size
infoBitsPerSample.Text = Info.BitsPerSample

See Also:

Bitrate | BitsPerSample | Channels | Duration | FormatString | Frequency | Samples

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


WMAFileInformation2_Methods

Methods (WMAFileInformation2 object)

Method | Description
DeleteMarker | Deletes the current marker.
DeleteScript | Deletes the current script from the file information.
GetAudioInformation | Gets information about an audio file.
InsertMarker | Inserts marker parameters into the audio file.
InsertScript | Inserts script command into the file.
SetAudioInformation | Writes information tags to an audio file

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


DeleteMarker method

DeleteMarker method (WMAFileInformation2 object)

Deletes the current marker.

Syntax

object.DeleteMarker

The DeleteMarker method syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.

Remarks:

The marker created by InsertMarker method and deleted by DeleteMarker method.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.InsertMarker "First", 10
Info.MarkerName = "First marker"
Info.InsertMarker "Second marker", Info.Duration - 2
Info.MarkerNum = Info.MarkerCount - 1
Info.MarkerTime = 30
Info.MarkerNum = Info.MarkerCount
Info.InsertMarker "Final marker", Info.Duration - 1
Info.MarkerNum = Info.MarkerCount - 1
Info.DeleteMarker

See Also:

InsertMarker

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


DeleteScript method

DeleteScript method (WMAFileInformation2 object)

Deletes the current script from the file information.

Syntax

object.DeleteScript()

The DeleteScript method syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.

Remarks:

The script can be inserted into the file by InsertScript method.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.InsertScript "URL", "http://www.nctsoft.com", 10
Info.ScriptCommand = "http://www.nctsoft.com/products/NCTAudioStudio2/"
Info.InsertScript "FILENAME", "c:/track02.wma", Info.Duration - 2
Info.ScriptType = "CAPTION"
Info.ScriptCommand = "Test"
Info.ScriptNum = Info.ScriptCount - 1
Info.ScriptTime = 30
Info.ScriptNum = Info.ScriptCount
Info.InsertScript "TEXT", "Text", Info.Duration - 1
Info.ScriptNum = Info.ScriptCount - 1
Info.DeleteScript

See Also:

InsertScript

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


GetAudioInformation method

GetAudioInformation method (WMAFileInformation2 object)

Gets information about an audio file.

Syntax

object.GetAudioInformation(fileName As String)

The GetAudioInformation method syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
fileName | String | The audio file pathname.

Remarks:

You can get and set the following properties after applying the GetAudioInformation method: infoAlbum, infoArtist, infoComments, infoComposer, infoCopyright, infoEncodedBy, infoGenre, infoOriginalArtist, infoTitle, infoTrack, infoURL, infoYear.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.GetAudioInformation "c:\music01.wma"
Info.infoYear = "2003"
Info.SetAudioInformation "c:\music02.wma"

See Also:

SetAudioInformation

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


InsertMarker method

InsertMarker method (WMAFileInformation2 object)

Inserts marker parameters into the audio file.

Syntax

object.InsertMarker(MarkerName As String, MarkerTime As Long)

The InsertMarker method syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
MarkerName | String | The marker name.
MarkerTime | Long | The marker time in ms.

Remarks:

The marker created by InsertMarker method and deleted by DeleteMarker method.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.InsertMarker "First", 10
Info.MarkerName = "First marker"
Info.InsertMarker "Second marker", Info.Duration - 2
Info.MarkerNum = Info.MarkerCount - 1
Info.MarkerTime = 30
Info.MarkerNum = Info.MarkerCount
Info.InsertMarker "Final marker", Info.Duration - 1
Info.MarkerNum = Info.MarkerCount - 1
Info.DeleteMarker

See Also:

DeleteMarker

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


InsertScript method

InsertScript method (WMAFileInformation2 object)

Inserts script command into the file.

Syntax

object.InsertScript(ScriptType As String, ScriptCommand As String, ScriptTime As Long)

The InsertScript method syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
ScriptType | String | The type of command. For more information about script type see ScriptType property.
ScriptCommand | String | The command data.
ScriptTime | Long | The moment for the beginning of the script execution.

Remarks:

The Windows Media Format SDK supports the use of script commands to communicate application actions in ASF files. Each script command is made up of two strings, the first string is the type of the command, the second is the command data. For example, you can use the script type "URL" and pass a valid Internet URL as the command data. When a reading application that supports script commands of type "URL" receives this command, it opens the specified address in a browser window.

Script commands can be included in the file header for retrieval at the time of playback. The playing application is responsible for the executing of the script commands at the proper time. The advantage of using script commands in the file header is that all the script commands are available before starting to receive samples.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.InsertScript "URL", "http://www.nctsoft.com", 10
Info.ScriptCommand = "http://www.nctsoft.com/products/NCTAudioStudio2/"
Info.InsertScript "FILENAME", "c:/track02.wma", Info.Duration - 2
Info.ScriptType = "CAPTION"
Info.ScriptCommand = "Test"
Info.ScriptNum = Info.ScriptCount - 1
Info.ScriptTime = 30
Info.ScriptNum = Info.ScriptCount
Info.InsertScript "TEXT", "Text", Info.Duration - 1
Info.ScriptNum = Info.ScriptCount - 1
Info.DeleteScript

See Also:

DeleteScript

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


SetAudioInformation method

SetAudioInformation method (WMAFileInformation2 object)

Writes information tags to an audio file.

Syntax

object.SetAudioInformation(fileName As String)

The SetAudioInformation method syntax has these parts:

Part | Type | Description
object | WMAFileInformation2 | An expression evaluating to an object.
fileName | String | Audio file's pathname.

Remarks:

Writes values of the following properties to an audio file: infoAlbum, infoArtist, infoComments, infoComposer, infoCopyright, infoEncodedBy, infoGenre, infoOriginalArtist, infoTitle, infoTrack, infoURL, infoYear.

Example:

' VB sample where Info is an WMAFileInformation2 object.
Info.infoAlbum = "Unknown album"
Info.infoArtist = "Unknown artist"
Info.infoComments = "No comments"
Info.infoComposer = "Unknown composer"
Info.infoCopyright = ""
Info.infoEncodedBy = ""
Info.infoGenre = "Pop"
Info.infoOriginalArtist = "Unknown original artist"
Info.infoTitle = "No title"
Info.infoTrack = "test"
Info.infoURL = "http://www.nctsoft.com"
Info.infoYear = "2003"
Info.SetAudioInformation "c:\music.wma"

See Also:

GetAudioInformation

Applies to: WMAFileInformation2

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT company http://www.nctsoft.com


Constants

Constants

Constants | Description
BitsPerSampleConstants | These are the constants for the following properties: BitsPerSample (WMAFile2 object), BitsPerSample (WMAFileInformation2 object).
ChannelsConstants | These are the constants for the following properties and methods: ArrayChannels, SetFormatArray methods and nChannels property (WMAFile2 object).
ErrorConstants | These are the constants for the following properties: LastErrorNum (WMAFile2 object), LastErrorNum (WMAFileInformation2 object).
FileSeekConstants | These are the constants for the SeekFile method.
FrequencyConstants | These are the constants for the following properties and methods: SetFormatArray method, nChannels, Frequency, ArrayFrequency properties (WMAFile2 object), and Frequency property (WMAFileInformation2 object).

Send Feedback on the NCTWMAFile2 documentation.
NCTWMAFile2 was developed by NCT Company Ltd. http://www.nctsoft.com


BitsPerSampleConstants enumeration

BitsPerSampleConstants enumeration

These are the constants for the following properties: BitsPerSample (WMAFile2 object), BitsPerSample (WMAFileInformation2 object).

Members

Part | Value | Description
BPS_2_BIT | 2 | 2 bits per sample.
BPS_3_BIT | 3 | 3 bits per sample.
BPS_4_BIT | 4 | 4 bits per sample.
BPS_5_BIT | 5 | 5 bits per sample.
BPS_8_BIT | 8 | 8 bits per sample.
BPS_16_BIT | 16 | 16 bits per sample.
BPS_24_BIT | 24 | 24 bits per sample.
BPS_32_BIT | 32 | 32 bits per sample.


ChannelsConstants enumeration

ChannelsConstants enumeration

These are the constants for the following properties and methods: ArrayChannels, SetFormatArray methods and nChannels property (WMAFile2 object).

Members

Part | Value | Description
MONO | 1 | Mono data uses one channel.
STEREO | 2 | Stereo data uses two channels.


ErrorConstants enumeration

ErrorConstants enumeration

These are the constants for the following properties: LastErrorNum (WMAFile2 object), LastErrorNum (WMAFileInformation2 object).

Members

Part | Value | Description
NOERRORS | 0 | No errors.
BUSY | -10 | It is impossible to execute the current method because the application is busy by another one.
MEMORY | -11 | Memory error.
FORMATFILE | -12 | Wrong file format. It is an attempt to open a non-audio file as an audio file.
FORMATNOTSUPPORT | -13 | Unsupported audio file format. It is an attempt to open an unsupported audio file format.
OUTDRIVER | -14 | Output audio device error. For example: wrong device, audio device is already opened in your application or is in use by another one and many others… It hardly depends on hardware.
INPDRIVER | -15 | Input audio device error. . For example: wrong device, audio device is already opened in your application or is in use by another one and many others… It hardly depends on hardware.
MIXERDRIVER | -16 | Mixer device driver error.
ACMDRIVER | -17 | ACM driver error.
FILEACCESS | -18 | The specified file is already in use.
INVALIDOPERATION | -19 | Invalid operation. For example, you try to execute READ method before OPEN method.
INVALIDPARAM | -20 | Invalid parameters. You try to execute a method with invalid parameters.
ASPIDRIVER | -21 | Incorrect CD driver operation. ASPI driver returns an error.
CONTROLNOTINSTALLED | -22 | Control not installed.
INDEXOUTOFRANGE | -23 | Incorrect address to the array. Index out of the array range.
STREAM | -24 |
UNEXPECTED | -40 | Unexpected error.


FileSeekConstants enumeration

FileSeekConstants enumeration

These are the constants for the SeekFile method.

Members

Part | Type | Description
CURRENT_POS | 1 | Current position.
BEGIN_POS | 3 | Beginning position.
END_POS | 2 | Ending position.


FrequencyConstants enumeration

FrequencyConstants enumeration

These are the constants for the following properties and methods: SetFormatArray method, nChannels, Frequency, ArrayFrequency properties (WMAFile2 object), and Frequency property (WMAFileInformation2 object).

Members

Part | Value | Description
FQ_96_KHZ | 96000 | 96000 hertz
FQ_88_KHZ | 88200 | 88200 hertz
FQ_48_KHZ | 48000 | 48000 hertz
FQ_44_KHZ | 44100 | 44100 hertz
FQ_32_KHZ | 32000 | 32000 hertz
FQ_24_KHZ | 24000 | 24000 hertz
FQ_22_KHZ | 22050 | 22050 hertz
FQ_16_KHZ | 16000 | 16000 hertz
FQ_12_KHZ | 12000 | 12000 hertz
FQ_11_KHZ | 11025 | 11025 hertz
FQ_8_KHZ | 8000 | 8000 hertz
FQ_6_KHZ | 6000 | 6000 hertz


Profiles description

Profiles description

At present it is possible to use only 51 existing profiles. Here is the list of the existing profiles.

Profile | Description | Profile name
1 | WMA 8,000 Hz; 16 Bit; Mono; 8 kbps. | Video for dial-up modems or single channel ISDN (28.8 to 56 Kbps)
2 | WMA 32,000 Hz; 16 Bit; Stereo; 32 kbps. | Video for LAN, cable modem, or xDSL (100 to 768 Kbps)
3 | WMA 8,000 Hz; 16 Bit; Mono; 8 kbps. | Video for dial-up modems or LAN (28.8 to 100 Kbps)
4 | WMA 8,000 Hz; 16 Bit; Mono; 4 kbps. | Video with voice emphasis for dial-up modems (28.8 Kbps)
5 | WMA 8,000 Hz; 16 Bit; Mono; 8 kbps. | Video with audio emphasis for dial-up modems (28.8 Kbps)
6 | WMA 8,000 Hz; 16 Bit; Mono; 8 kbps. | Video for Web servers (28.8 Kbps)
7 | WMA 11,025 Hz; 16 Bit; Mono; 10 kbps. | Video for Web servers (56 Kbps)
8 | WMA 11,025 Hz; 16 Bit; Mono; 10 kbps. | Video for single-channel ISDN (64 Kbps)
9 | WMA 16,000 Hz; 16 Bit; Mono; 16 kbps. | Video for e-mail and dual-channel ISDN (128 Kbps)
10 | WMA 32,000 Hz; 16 Bit; Stereo; 32 kbps. | Video for broadband NTSC (256 Kbps)
11 | WMA 32,000 Hz; 16 Bit; Stereo; 32 kbps. | Video for broadband NTSC (384 Kbps)
12 | WMA 44,100 Hz; 16 Bit; Stereo; 64 kbps. | Video for broadband NTSC (768 Kbps)
13 | WMA 44,100 Hz; 16 Bit; Stereo; 128 kbps. | Video for broadband NTSC (1500 Kbps total)
14 | WMA 44,100 Hz; 16 Bit; Stereo; 128 kbps. | Video for broadband NTSC (2 Mbps total)
15 | WMA 44,100 Hz; 16 Bit; Stereo; 128 kbps. | Video for broadband film content (768 Kbps)
16 | WMA 44,100 Hz; 16 Bit; Stereo; 128 kbps. | Video for broadband film content (1500 Kbps total)
17 | WMA 8,000 Hz; 16 Bit; Mono; 6 kbps. | Audio for low bit rate voice-oriented content (6.5 Kbps)
18 | WMA 22,050 Hz; 16 Bit; Mono; 20 kbps. | Audio for FM radio quality for dial-up modems (28.8 Kbps mono)
19 | WMA 22,050 Hz; 16 Bit; Stereo; 20 kbps. | Audio for FM radio quality for dial-up modems (28.8 Kbps stereo)
20 | WMA 32,000 Hz; 16 Bit; Stereo; 32 kbps. | Audio for dial-up modems (56 Kbps stereo)
21 | WMA 32,000 Hz; 16 Bit; Stereo; 48 kbps. | Audio for single-channel ISDN (64 Kbps stereo)
22 | WMA 44,100 Hz; 16 Bit; Stereo; 64 kbps. | Audio for near-CD quality (64 Kbps stereo)
23 | WMA 44,100 Hz; 16 Bit; Stereo; 96 kbps. | Audio for CD-quality (96 Kbps stereo)
24 | WMA 44,100 Hz; 16 Bit; Stereo; 128 kbps. | Audio for CD-quality transparency (128 Kbps stereo)
25 | WMA 22,050 Hz; 16 Bit; Stereo; 32 kbps. | Video for color PDA devices (225 Kbps)
26 | WMA 22,050 Hz; 16 Bit; Stereo; 32 kbps. | Video for color PDA devices (150 Kbps)
27 | WMA 22,050 Hz; 16 Bit; Stereo; 32 kbps. | Windows Media Video 8 for Color Pocket PCs (225 Kbps)
28 | WMA 22,050 Hz; 16 Bit; Stereo; 32 kbps. | Windows Media Video 8 for Color Pocket PCs (150 Kbps)
29 | WMA 8,000 Hz; 16 Bit; Mono; 8 kbps. | Windows Media Video 8 for Dial-up Modems or Single-channel ISDN (28.8 to 56 Kbps)
30 | WMA 32,000 Hz; 16 Bit; Stereo; 32 kbps. | Windows Media Video 8 for LAN, Cable Modem, or xDSL (100 to 768 Kbps)
31 | WMA 8,000 Hz; 16 Bit; Mono; 8 kbps. | Windows Media Video 8 for Dial-up Modems or LAN (28.8 to 100 Kbps)
32 | WMA 8,000 Hz; 16 Bit; Mono; 5 kbps. | Windows Media Video 8 for Dial-up Modems (28.8 Kbps)
33 | WMA 11,025 Hz; 16 Bit; Mono; 10 kbps. | Windows Media Video 8 for Dial-up Modems (56 Kbps)
34 | WMA 16,000 Hz; 16 Bit; Mono; 16 kbps. | Windows Media Video 8 for Local Area Network (100 Kbps)
35 | WMA 32,000 Hz; 16 Bit; Stereo; 40 kbps. | Windows Media Video 8 for Local Area Network (256 Kbps)
36 | WMA 32,000 Hz; 16 Bit; Stereo; 48 kbps. | Windows Media Video 8 for Local Area Network (384 Kbps)
37 | WMA 44,100 Hz; 16 Bit; Stereo; 64 kbps. | Windows Media Video 8 for Local Area Network (768 Kbps)
38 | WMA 44,100 Hz; 16 Bit; Stereo; 64 kbps. | Windows Media Video 8 for Broadband (NTSC, 700 Kbps)
39 | WMA 44,100 Hz; 16 Bit; Stereo; 128 kbps. | Windows Media Video 8 for Broadband (NTSC, 1400 Kbps)
40 | WMA 32,000 Hz; 16 Bit; Stereo; 48 kbps. | Windows Media Video 8 for Broadband (PAL, 384 Kbps)
41 | WMA 44,000 Hz; 16 Bit; Stereo; 64 kbps. | Windows Media Video 8 for Broadband (PAL, 700 Kbps)
42 | WMA 22,050 Hz; 16 Bit; Mono; 20 kbps. | Windows Media Audio 8 for Dial-up Modem (Mono, 28.8 Kbps)
43 | WMA 22,050 Hz; 16 Bit; Stereo; 20 kbps. | Windows Media Audio 8 for Dial-up Modem (FM Radio Stereo, 28.8 Kbps)
44 | WMA 32,000 Hz; 16 Bit; Stereo; 32 kbps. | Windows Media Audio 8 for Dial-up Modem (32 Kbps)
45 | WMA 44,100 Hz; 16 Bit; Stereo; 48 kbps. | Windows Media Audio 8 for Dial-up Modem (Near CD quality, 48 Kbps)
46 | WMA 44,100 Hz; 16 Bit; Stereo; 64 kbps. | Windows Media Audio 8 for Dial-up Modem (CD quality, 64 Kbps)
47 | WMA 44,100 Hz; 16 Bit; Stereo; 96 kbps. | Windows Media Audio 8 for ISDN (Better than CD quality, 96 Kbps)
48 | WMA 44,100 Hz; 16 Bit; Stereo; 128 kbps. | Windows Media Audio 8 for ISDN (Better than CD quality, 128 Kbps)
49 | WMA 44,100 Hz; 16 Bit; Stereo; 64 kbps. | Windows Media 8 Fair Quality based VBR for Broadband
50 | WMA 44,100 Hz; 16 Bit; Stereo; 64 kbps. | Windows Media 8 High Quality based VBR for Broadband.
51 | WMA 44,100 Hz; 16 Bit; Stereo; 64 kbps. | Windows Media 8 Best Quality based VBR for Broadband.

See Also:

ProfileCount | ProfileName | ProfileNum


NCTWMAFILE2Lib

NCTAudioStudio2 ActiveX DLLs

Version 2.2

NCTWMAFile2 ActiveX DLL is intended for getting audio data from WMA audio file and writing audio data to WMA audio file.

NCTWMAFile2 consist of two objects:

  • WMAFile2 - the main object for getting and writing audio data from WMA audio file.

  • WMAFileInformation2 - a complementary object for reading, changing and writing information about WMA audio file.

With NCTWMAFile2 ActiveX DLL you can:

  • Open WMA audio file.

  • Read audio data from opened file.

  • Get info about WMA file.

  • Change current position in WMA audio file.

  • Create a new WMA audio file.

  • Set format of WMA audio file.

  • Write audio data to WMA audio file.

  • Convert WMA audio file from one format to another.

NCTWMAFile2 is a part of the NCTAudioStudio2 package.